Skip to content

Sync upstream/main into fork/main (WI-3327) - #37

Merged
thedancingdeveloper merged 1456 commits into
fork/mainfrom
sync-upstream-2026-11-06
Nov 13, 2026
Merged

thedancingdeveloper merged 1456 commits into
fork/mainfrom
sync-upstream-2026-11-06

Conversation

@thedancingdeveloper

@thedancingdeveloper thedancingdeveloper commented Nov 6, 2026 •

Copy link
Copy Markdown

Merges upstream/main (1133 commits ahead) into fork/main (95 carried commits). Merge, not rebase: this deviates from FORK.md, which says to rebase onto a stable tag and force-push. FORK.md's base marker is now stale and needs updating after this lands. Not merged; WI-3327.

Conflicts (45) and resolution

  • Cherry-picked upstream fixes Preserve line breaks and links in multiline async questions openai/codex#51866 and Limit daemon feature compatibility checks to explicit CLI overrides openai/codex#52648 (async questions, daemon_*, startup_orchestration, daemon_compatibility): took upstream.
  • mcp_refresh, message_processor, scenarios, features (InstantInterrupt default): upstream already has the change; took upstream.
  • hooks failClosed: HookHandlerConfig moved to protocol/src/hooks.rs; field re-added there.
  • spawn_agent output_schema: upstream moved spawning into thread_spawn.rs; plumbed through ThreadSpawnRequest into SpawnAgentOptions.
  • write_stdin PreToolUse review: re-implemented on upstream's terminal-environment refactor (process id comes from ToolEnvironments::Terminal).
  • MCP unqualified-name lookup (registry.rs): kept both functions.
  • project_doc_all (agents_md.rs), skills extra roots (host_roots.rs): kept, adapted to new APIs.
  • chat wire (client.rs, chat_request.rs, sse/chat.rs): kept, adapted to new ResponseStream, ResponseItem, ContentItem and telemetry APIs.
  • agent-state title tests kept. Upstream deleted the title-progress tests; dropped them.
  • Dropped: the exec_command workdir hook field. Upstream's pre_tool_use_cwd now gives hooks the resolved cwd. Vogt's guard should read hook cwd; check before pinning this SHA.
  • Snapshots and the two app-server .zst exports: upstream versions, then regenerated (config, hooks, app-server schemas, experimental exports).

Carried commits

Tests (CARGO_BUILD_JOBS=4)

  • cargo check --tests: codex-api, protocol, hooks, core, skills-extension, app-server, tui, exec: clean.
  • Pass: codex-api, codex-hooks, codex-config, codex-app-server-protocol.
  • codex-core (RUST_MIN_STACK=8388608): 5319 passed, 638 failed, 3 timed out. Failures I classed from the log are environmental: missing helper binaries (test_stdio_server, codex-code-mode-host, codex) and bwrap refusing user namespaces. Not compared against a plain-upstream baseline. Some failures are scenario snapshot diffs (tool-shape lines) that I have NOT triaged; the spawn_agent output_schema change may legitimately need snapshot updates. Needs CI.
  • codex-skills-extension: 2 failures (host_service snapshot_for_config_*) read skills from this host's home directory: environmental.
  • codex-tui: not run.

Vogt impact

Vogt pins fork/main SHAs and fork- releases; this sync changes both. Needs a new fork release and a pin bump after merge, not done here.

Update 2026-11-10

Re-merged upstream/main 6dfaca4dad (2026-11-10 08:52 UTC) on top of this
branch. Two conflicts, both precomputed app-server .zst exports: took
upstream's bytes and regenerated; regeneration is idempotent.

One merge defect found and fixed: upstream's --oss model_provider push
mutates cli_kv_overrides after the fork's mcp_optional_startup_grace_ms
helper shadows it, so codex-exec did not compile (E0596). The shadow now
keeps mut; the first binding drops it.

Verified on the merged tree:

  • cargo check --workspace --all-targets --exclude codex-voice-host --exclude codex-bwrap — clean, no warnings
  • cargo test -p codex-exec --lib exec_waits_for_mcp_startup — pass
  • cargo test -p codex-otel metrics::tags::tests — pass (plus signs in metric tags)
  • app-server schema regeneration — idempotent

codex-voice-host is excluded for the same reason fork-ci excludes it
(GStreamer >= 1.28; Ubuntu ships 1.24); codex-bwrap needs libcap, which this
host cannot apt-install. Neither is changed by the merge, and both run in CI.

FORK.md now records this merge and notes that its base markers are still
rust-v0.162.0 while the tree carries code from after rust-v0.167.0, so a
release cut from this merge reports 0.162.0+fork.<sha> until the next rebase
or a restamp of upstream_version in fork-release.yml.

Also fixed a fork bug found while chasing a startup warning: codex doctor
did not know the fork's agent-state terminal title item, so it warned about
a config the TUI accepts. One match arm plus the accepted-items test;
cargo test -p codex-cli --bin codex doctor::title passes (8/8).

btraut-openai and others added 30 commits November 5, 2026 08:10
…nai#59601)

## What changed

Allow experimental clients to request `deferOutput: {"commandExecution": true}` in `thread/items/list` for a specific `turnId`. Completed commands with a recorded completion time, exit code zero, and nonempty saved output return `outputDeferred: true` and `item.aggregatedOutput: null`. Clients can retrieve the complete output through `thread/items/read` using the turn and item IDs.

Keep full output by default and for listings across turns. Make conversion from `ThreadItemEntry` to `ThreadItem` fallible so Rust consumers detect deferred output instead of treating an incomplete item as complete.

## Testing

Add integration coverage for experimental capability gating, default and disabled options, command status and output eligibility, listings across turns, deferred-item conversion, and full output retrieval by item ID.

GitOrigin-RevId: d6bfac34bb68f7e3b327fd5553270ed6d0fe87cf
## What changed

Remove `dynamic_network_policy`, which only converted `SandboxPolicy` to `NetworkSandboxPolicy`. Update the Seatbelt network policy tests to call `dynamic_network_policy_for_network` directly with explicit `Restricted` or `Enabled` policies, preserving the existing assertions.

GitOrigin-RevId: 8d712cc542a07e516de677d69499aff7f3918354
…9633)

## Why

A Code Mode script can start a command without returning its session handle. Make retained sessions visible to the model so it can find running commands and collect exited results with `write_stdin`.

## What changed

- Add the disabled-by-default `command_sessions_world_state` feature.
- Publish snapshots of up to 16 retained sessions with their IDs, running or exited status, and whether they are in use. Report omitted sessions and suppress unchanged updates.
- Preserve session visibility when `write_stdin` is unavailable and refresh snapshots after compaction. Clear stale session handles after restart or when the feature is disabled.

## Testing

Add an end-to-end scenario and model-visible history snapshot covering a dropped command handle, unchanged state, unavailable polling, compaction, exit and result collection, and stale-handle cleanup after restart.

GitOrigin-RevId: 45704d8c6403149997231aafb8496c12879aff23
…ai#59638)

## Why

`pin-utils` 0.1.0 is unmaintained with no patched release and remains a transitive dependency through AWS Smithy and `loom` under `tokio-graceful`.

## What changed

Add `RUSTSEC-2026-0441` to the ignore lists in `codex-rs/.cargo/audit.toml` and `codex-rs/deny.toml`. Document the dependency paths and remove the exception when they drop `pin-utils`.

GitOrigin-RevId: 803d519ad3ad044d49d73ff2a172c6e0b01fc8d3
…#59642)

## Why

Guardian scoring and cached approvals need to use the requesting turn's captured policy even when the live thread configuration changes. Newly tightened mandatory review requirements must still prevent cached approvals.

## What changed

- Pass captured turn configuration through tool lifecycle and approval review inputs, and use it to resolve Guardian policy and classifier instructions.
- Apply current reviewer and model requirements before scoring and cached approval, including rechecking restrictions after collecting score authorization.
- Count computer-use JavaScript execution attempts even when background scoring is disabled, so a synchronous call consumes the initial-call allowance.
- Retain runtime configuration snapshots when applying agent role overrides, and share Guardian policy text resolution between configuration loading and runtime publication.

## Testing

Add and extend regression coverage for captured policy instructions, reviewer restrictions, stale cached evidence, and a synchronous computer-use call followed by an adaptive turn.

GitOrigin-RevId: 24ed4a1b6ce1733ad775790f30e440da614f9cd6
## What changed

When `features.guardian_denial_reconsideration` is enabled, retry the first terminal denial once using the unchanged inference request. Buffer provisional output so only the selected response enters reviewer history, while allowing tool calls to proceed normally.

Preserve the original denial if the retry fails or times out, and continue to honor cancellation. Account for token usage from both attempts, including failed reviews.

Remove `auto_review.experimental_denial_reconsideration_prompt` and warn when it remains in configuration.

## Testing

Update the Guardian scenario and snapshot to verify identical retry inputs, retained tool evidence, and reuse of the selected assessment in a subsequent review, with asynchronous compaction enabled.

GitOrigin-RevId: cc4e303d40a02acc824c8b4b954852325e64ad52
## What changed

Add `EvidenceSnapshot::capture` to read original evidence from `ThreadStore` into an immutable snapshot with root-history ordinals. Preserve accepted user messages, assistant messages, tool activity, verified answers, delivered assistant messages, and host-annotated approvals without changing their contents or provenance.

Exclude generated context and compaction output. Reject forked or reverted histories, inherited or ambiguously attributed user messages, and incomplete retained evidence. Capture currently supports append-only root histories and requires the host to flush pending originals first.

## Testing

Add an integration test covering content preservation, generated-context filtering, approval provenance, isolation from later appends, and rejection of ambiguous user messages.

GitOrigin-RevId: f464a2714c2678bcffe7abf0a8224196bfe48692
openai#59670)

## Why

Evidence capture previously reloaded the full history without tracking consumer progress. Live consumers need to read new originals from activation onward and acknowledge them after downstream writes succeed.

## What changed

- Add an in-memory `EvidenceCursor` that starts at the current complete tail without backfilling, captures a fixed unread range, and supports partial acknowledgements. Reads leave progress unchanged.
- Add `ThreadStore::read_original_history` to read original records and their source positions through a fixed cutoff. Local storage supports append-only paginated root histories, including compressed rollouts, and defers unfinished records.
- Reject unsupported histories and invalid ranges, and retain source ordinals as evidence IDs.

## Testing

Add coverage for partial records, compressed suffixes, fixed cutoffs, mismatched thread positions, and truncation. Extend evidence tests to cover activation without backfill, partial acknowledgements, later appends, stale captures, and unchanged cursor progress after capture errors.

GitOrigin-RevId: c7a13749fedc4f44fadddc9dd9875043bccebd95
## What changed

Add a `Housekeeper` that uses an isolated reviewer runtime to route captured original evidence into topic channels and update their discovery descriptions. Keep originals intact and batch inputs within the selected model's tool-output budget.

Validate routing responses before writing to the message board. Advance the evidence cursor only after all writes succeed, stop the worker after an error, and return the runtime disposition so callers can manage session reuse.

## Testing

Add integration coverage for routing originals to multiple channels, updating descriptions, preserving capture boundaries, batching within the input budget, and leaving the cursor unchanged on write failure.

GitOrigin-RevId: 670508c7ecf2ddffdd2946f1b25dd7e071318c5a
## What changed

Remove `summarize_sandbox_policy` and its public export from `codex-utils-sandbox-summary`, leaving `summarize_permission_profile` as the summary API. Migrate the external-sandbox, read-only, and workspace-write summary tests to permission profiles.

GitOrigin-RevId: 2ea039a2573e05c17edb8356aa7e04e065ef592a
)

Move channel notification formatting into `PostPreview::notification_text()` and use it in the local message-board host. Preserve the notification fields, preview text, and `read_post` hint for truncated posts.

GitOrigin-RevId: fd3596c45194c958817a24f8fc35a886f766a84b
…nai#59691)

Give each independent MCP server and session setup its own test identity
and timeout budget by replacing nested loops with `test_case::test_matrix`.
Preserve all 64 configuration combinations and the existing assertions for
direct tool exposure, tool search availability, and advertised tool calls.

GitOrigin-RevId: 74ef56d34b6bab3038b70d7d84183f7d104788a2
…59693)

## What changed

- Map thread listing and creation, paginated turn and item history, and turn submission and interruption to Cloud operations.
- Mark listed and activated threads as using paginated history, and warn when history items cannot be displayed.
- Reject unsupported filters, custom settings, and structured input. Require stable submission IDs and avoid returning a running turn for duplicate or queued submissions.
- Forward optional `turn_trigger` values through the Cloud client.

## Testing

Add coverage for resume-picker pagination, unsupported filters, submission IDs and settings, duplicate and queued admissions, and `turn_trigger` wire encoding.

GitOrigin-RevId: dcbd87d8190786da65e343a3a0f8d849b24a5b26
## Why

Reasoning summaries can arrive with item start or completion events rather than streamed deltas. The TUI can miss or truncate these summaries, and replay after a voice handoff can hide reasoning that started before the handoff.

## What changed

- Initialize reasoning from item start payloads and reconcile live and replayed completions with their full summaries. Preserve streamed text when completion payloads are empty, and continue honoring `show_raw_agent_reasoning`.
- Retain active reasoning payloads across refreshes without resetting an already active item when its start event is replayed.
- Preserve the typed origin of reasoning started before a voice handoff and filter later delegated reasoning starts from buffered replay.

## Testing

Extend regression coverage for summaries supplied at start or completion, partial streamed summaries, active reasoning after refresh, and replay that retains pre-handoff summaries while hiding delegated reasoning even after the handoff marker is evicted.

GitOrigin-RevId: 724b9fc58e10f4d87dabd3d9930e252270855a4f
## Why

A tool can start before an assistant message finishes streaming. The TUI needs to incorporate the completed text without duplicating the reply or leaving Markdown split across interrupted fragments. Some streams also include initial text in `item/started` before sending deltas.

## What changed

- Display initial assistant text from `item/started`, avoiding duplicate starts for the same message.
- Track interrupted replies by turn and item ID, then replace their flushed fragments with the completed message at the reply's original position, preserving intervening tool order.
- Re-render the completed Markdown and update transcript views and scrollback.

## Testing

Extend streaming tests to cover initial text, resumed deltas, Markdown spanning a tool interruption, and matching live and replayed transcripts. Expand completion-repair cases to cover missing text and resumed fragments.

GitOrigin-RevId: 7f35e52d0bca2100baf722d7ef4922cd127bbc45
## Why

Matches in parent directory names can crowd matching filenames out of limited search results. For example, searching for `ViewModel` should keep `ChatViewModel.kt` visible even when many directories are named `viewmodel`.

## What changed

- Rank basename matches before applying the result limit for single positive fuzzy queries without path separators.
- Prefer exact filenames, then the strongest exact directory match, then other matching filenames. Leave additional directory matches ranked by their paths.
- Compute highlight indices from the basename for promoted results and return scores that reflect the new ranking.
- Rank snapshots in resumable time slices so new queries and cancellation can interrupt the work.

## Testing

Add regression coverage for filename matches surviving the result limit, exact file and directory priority, path queries, and resuming partial rankings. Update app-server score expectations while preserving highlight indices.

GitOrigin-RevId: 41b3420581b4f6490859e809245370b737889544
## What changed

Replace external `rg` scans and the fallback walker with an in-process `ignore` walker for bubblewrap deny-glob expansion. Remove scanner lookup and dependency tracking from sandbox integrity checks.

Include hidden and ignored files, respect scan depth limits, and fail closed on traversal errors. Anchor patterns to their static search roots and preserve literal leading `#`, leading `!`, trailing spaces, and unclosed character classes. Follow explicit symlink roots while skipping child symlinks, and mask canonical targets of matched paths.

## Testing

Extend unit and sandbox integration coverage for glob syntax, depth limits, traversal failures, symlink handling, commands launched from `/`, and operation without executing `rg`.

GitOrigin-RevId: 1767d7f37acb149457642bf24ee5971a28696438
Document that `AgentMessageBoard` notification delivery follows the host's
scheduling and wake policy and may buffer notifications for idle recipients.
Link to `MessageBoardHost` for the delivery contract.

GitOrigin-RevId: fb085fe2c43c74b85b4e6fe471e7d4ae216bf3db
GitOrigin-RevId: d7f7c2db52349797c0063526c1ad8e35d4217252
…59722)

## What changed

- Add Space to set the default provider from Model providers settings, persisting `model_provider` on the connected server. Keep provider details available and disable selection when server configuration or client launch settings fix the provider.
- Apply the choice to `/new` while preserving the current chat. Refresh account details for new chats and reject account data that does not match the started provider.
- Block stale `/model` choices during saves and after confirmed or uncertain provider changes, including across reconnects. Tell users to restart the app server and TUI to refresh the model list, and discard queued picker actions from another backend or chat.

## Testing

Add coverage for provider saves, retry after disconnection, concurrent-save prevention, stale model choices, and account/provider matching, with updated provider-picker snapshots.

GitOrigin-RevId: af6d149f7de7a2eaa09a31935f7088faa64d6a59
## What changed

Expose `AgentTurnOutcomeReporter` for hosts to install through `StartThreadOptions::thread_extension_init`. Await its callback after emitting the terminal turn event, independently of native parent notifications, so hosts can handle result delivery and retries.

Track outstanding outcome handoffs and wait for them during graceful shutdown before running thread-stop hooks. Prevent new turns from starting once handoff registration closes.

## Testing

Add integration coverage for completed and errored outcomes, turn lineage, queued follow-up turns, and shutdown waiting for handoffs. Extend Guardian tests to verify that strict safety stops reach the reporter while default interruptions remain silent.

GitOrigin-RevId: 0d825f6208f0250969734488881f32fd1dcd7509
)

## Why

Idle reads from local MCP servers on Windows can occupy Tokio's blocking threads and delay unrelated filesystem operations.

## What changed

Use IOCP-backed named pipes for local MCP server stdin, stdout, and stderr on Windows. Connect child endpoints before launch, restrict pipe access to the owner and SYSTEM, and reject remote clients. Preserve the shared legacy and modern protocol framing.

## Testing

Add Windows regression tests to verify that idle MCP reads leave blocking I/O available in both protocol modes and that child output handles support querying the pipe mode.

GitOrigin-RevId: ca39b940a54427a2cd7bab5291011b0b09143b3f
…ai#59728)

GitOrigin-RevId: f332fd4f86e08c6a5e9bfe08966f9b30c82113ff
…ai#59732)

## Why

Multi-agent V2 still supplied native tool usage guidance when native tools were disabled, leaving instructions for unavailable tools in model requests.

## What changed

Skip bundled and model catalog role guidance for both root agents and subagents when `disable_native_tools` is enabled. Preserve explicitly configured usage hints.

## Testing

Add coverage for omitted bundled and catalog guidance and preserved configured hints with native tools disabled. Update the request snapshot and assert that spawned agents do not receive native tool call guidance.

GitOrigin-RevId: 6f2facabc95e78cbf64af19636a4daf488bbcc51
## What changed

Extend `guardian_review` to assess recorded MCP tool calls using the current tool catalog, bindings, and approval policy without executing the call or remembering an approval. Return no assessment when policy or a remembered approval skips review, and reject tools blocked by app configuration.

## Testing

Add a scenario test that compares direct and live MCP review inputs, verifies that neither dispatches the tool, and checks that the current app approval policy can skip review.

GitOrigin-RevId: 05746dd0804a0f96d7946468701d5222171ff64f
## Why

Versions of `ignore` differ in whether parallel walks report traversal errors at the depth boundary, making the test's expectation depend on the walker implementation.

## What changed

Keep the denied directory within the bounded scan depth in `unreadable_glob_traversal_errors_fail_closed`. Require both bounded and unbounded scans to fail with the denied path and permission error, replacing the CPU-count-dependent assertion.

GitOrigin-RevId: 4ed97253247e0c032648ebc6d4be2a97c3ab261a
…penai#59737)

## What changed

Require the `openai` provider ID as well as `GuardianNativeMultiAgentHistory` to enable native agent history and review of multi-agent calls. Apply the same check to Guardian prompt construction, collaboration tool registration, and Guardian v2 configuration.

## Testing

Add coverage for fresh and resumed sessions with the feature enabled and disabled on OpenAI, and enabled on Bedrock and LiteLLM. Verify that only OpenAI sessions with the feature enabled request native review and include the agent call as evidence.

GitOrigin-RevId: bfbe547b0544e66763dca7d1e1376f805994bcb2
…59739)

## What changed

- Open a sidebar chooser when no side chat exists, with keyboard and mouse controls to start a new side chat while preserving the parent draft.
- Animate sidebar opening and closing, including reversing an unfinished transition, when animations are enabled.
- Show context-aware workspace shortcuts in a floating panel after a short delay, and render presets in the same overlay without moving the composer.
- Prevent chooser input from accepting an approval dialog before it has been painted.

## Testing

Add coverage for chooser activation and draft preservation, sidebar animation reversal, shortcut and preset snapshots, and approval input handling.

GitOrigin-RevId: 014112622a94798f4e611756c55112dfd8016051
…enai#59743)

## Why

Explicit cyber access program selections were dropped for requests using `CodexAuth::Headers`, preventing the server from evaluating the requested program.

## What changed

Forward explicit program selections for header-authenticated requests, leaving entitlement decisions to the server.

## Testing

Add integration tests covering explicit selections and omission over HTTP and a reused WebSocket connection, preservation of actor and account headers, and propagation of backend HTTP 403 denials without dropping the selected program.

GitOrigin-RevId: 5e549e87a1420ce8a5f1ce5c704cc6b7630af3ba
## Why

Legacy `.sandbox-bin` ACLs grant `SYSTEM` Modify access without `WRITE_DAC`, preventing the provisioning service from reapplying the bin policy.

## What changed

- Grant `SYSTEM` inheritable `WRITE_DAC` access when protecting the sandbox bin so it can update permissions on the directory and its children.
- Before legacy provisioning, repair the old ACL through an authenticated owner handle when `SYSTEM` is denied access. Upgrade only the expected SYSTEM entry in a protected, allow-only ACL, reject unexpected permissions, and verify that `SYSTEM` can reopen the directory with `WRITE_DAC`.

## Testing

Extend ACL coverage to check `SYSTEM` permissions on the bin and existing and newly created runner files. Add an ignored Windows integration test requiring LocalSystem and user-owned legacy homes to cover successful repair, repeated repair, and rejection of an explicit SYSTEM deny entry.

GitOrigin-RevId: 2303cdf5182947c2d044c79ac7027a16f0373c7d
thedancingdeveloper and others added 9 commits November 11, 2026 09:08
90 tests fail because bwrap cannot create a user namespace on the
node-b-gha-public-publish runner (or the sandboxed command exits 1 for
the same reason). code_mode_excludes_mcp_servers_using_their_configured_identity
timed out on both this run and baseline run 42897578509.
The 2026-11-06 upstream merge (835933f) took upstream's rewritten
exec_command.rs and dropped the fork's `resolved_hook_workdir`, while
keeping the fork's expectation in
hooks::pre_tool_use_merges_hooks_json_and_config_toml. Re-apply it on top
of upstream's `ExecCommandWorkdirArgs::resolve_cwd` and `selected_executor`
so the hook sees the directory the command runs in, and restore the two
unit tests the merge lost.

Upstream's new hooks_cwd_tests.rs expectations are adapted to the fork's
hook input: exec_command PreToolUse carries `workdir`, and a non-empty
write_stdin is reviewed as a Bash PreToolUse (kept by operator decision).
The hook identity hash is computed over the serialized handler. The fork's
`failClosed` field was always serialized, so every command hook that does
not set it hashed differently from upstream, and upstream's
declaration-only plugin trust approvals no longer matched: the plugin hook
was treated as untrusted and never ran
(hooks::plugin_pre_tool_use_blocks_exec_command_before_execution).
Skipping the field when false keeps the hash identical to upstream for
such handlers; a handler that sets failClosed still hashes differently,
so enabling it still requires re-approval.
… sync

The sync took upstream's copies of 68 snapshots (67 codex-core scenario
and request_plugin_install, 1 codex-app-server thread_sample). Upstream's
spawn_agent schema has no `output_schema` property, so the sub-agent
namespace hash, and the hashes that embed it, differ from what the fork
renders. Re-accepted with cargo insta; every changed line is a
`hash=<16 hex>` value (headers kept as they were), the same cause as
7d861cd.
rustc on codex-core's `all` test target was OOMKilled at the
nodef-gha-public-docker runner's 10 GiB memory limit during a full-width
cargo check (fork-ci run 43003880297). Two jobs, as for clippy (WI-3954).
c6d8d79 changed the HookHandlerConfig::Command doc comment and added
skip_serializing_if, but did not regenerate core/config.schema.json.
config::schema::tests::config_schema_matches_fixture failed on the fixture
diff in fork-ci run 43007148311. Regenerated with
`cargo run -p codex-config-schema --bin codex-write-config-schema`; the only
change is removing the failClosed default and updating its description.
fork-ci run 43007148311 (attempt 3) ran the suite on ci-k8s-0 as uid 0.
Twenty-seven failures are runner capability, not PR #37: 23 need a non-root
user or a usable user namespace (read-only files stay writable, chmod 000
stays readable, approval prompts never fire, nested commands are not
blocked), and four hook-timing tests already failed on unmodified fork/main
in run 42897578509. Each added line cites the run that showed it.

The schema failure is not quarantined; it is fixed in the previous commit.
Reverse these filters when ci-k8s-0 runs non-root with a user namespace.
…ust (run 43114813312)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…(WI-4100)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@thedancingdeveloper
thedancingdeveloper marked this pull request as ready for review November 12, 2026 01:46
@thedancingdeveloper
thedancingdeveloper added this pull request to the merge queue Nov 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 12, 2026
thedancingdeveloper and others added 3 commits November 12, 2026 04:08
The merge queue ran fork-ci as merge_group run 43136846045 on node-f
(nodef-gha-public-rust) and the cargo test build died compiling
codex-core's "all" test target. Cargo saw only the kache wrapper exit 1
with no compiler diagnostic, because the rustc under it was killed:
node-f's runner cgroup hit ~20 GiB of its 24 GiB limit (and the host has
20 GiB of RAM) while the test build compiled the workspace at default
parallelism.

The queue tested tree 4d975bf, which is byte-identical to the green PR
run 43127706154: base 529603b is an ancestor of head 1a91dee, the
node-f pin applied to both runs, and both ran on nodef-gha-public-rust.
The only difference was kache: 88.3% hits in the green run, 1.4% in the
queue run after a GC pruned 39.7 GiB, so the queue compiled ~4,700
crates at full width instead of restoring them.

Cap the bins build and nextest's build at two jobs, the same limit check
and clippy already use for the same memory reason (WI-3954). This makes a
cold-cache run slower, not fragile.
…129)

Failed both tries in fork-ci run 43152854593, passed in 43127706154 on
identical code and locally in isolation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…id-turn (WI-4137)

model_search::resolve cached the turn's search discovery keyed on the
identity of the step's McpBinding. When codex_apps finished starting after
the turn began, the runtime's catalog revisions changed and the next
sampling step got a new binding for the same Apps transport, so discovery
ran a second scoped tools/list mid-turn (the extra listing at
web_search.rs:949 seen on node-f under load).

Reuse the turn's discovery while the same Apps client still serves an
unchanged search tool, and rebase a Ready projection onto the new binding.
A reconnected client or changed search tool still rediscovers.

Five late_apps_startup_* cases hold Apps initialize so codex_apps becomes
ready after the turn starts; they fail on the old code (5/5) and pass with
the fix. Drop the three WI-4129 quarantine entries and quarantine only the
TUI notification timer test, which is not reproduced locally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thedancingdeveloper
thedancingdeveloper added this pull request to the merge queue Nov 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Nov 12, 2026
@thedancingdeveloper
thedancingdeveloper added this pull request to the merge queue Nov 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Nov 12, 2026
…90-minute timeout (WI-4161)

The merge_group run of `fmt, clippy, test` took 95-105 minutes as one serial
job (runs 43201899230, 43294592581), past the queue's 90-minute
check_response_timeout. Two thirds of it was serial structure, not work:

- codex-app-server's integration binaries are in nextest's
  app_server_integration group (max-threads = 1). After the other ~22,000
  tests finished, they ran alone for ~25 minutes.
- cargo check, clippy, the bins build and the test build ran one after the
  other, each capped at --jobs 2.

Now `plan` selects packages, then three jobs run in parallel: `fmt, clippy`,
`test` (every selected test except the app-server integration binaries) and
`test (app-server integration)`. The two test halves are one filter and its
negation, so the test set is unchanged; the known-failures list still applies
to both and the quarantined tests stay as they are. The required context
`fmt, clippy, test` is now an aggregator job that passes only when every job
passed or was skipped by path scope.

cargo check is skipped when the selection is every workspace member, since
clippy --all-targets then compiles the same targets; clippy now fails on any
rustc error, and on a failed build with no diagnostic.

The fixed --jobs 2 cap is replaced by fork-ci-build-jobs.sh: min(cores,
memory limit / 3 GiB), which keeps the OOM guard from WI-3954 but uses every
core the runner's memory can feed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thedancingdeveloper

Copy link
Copy Markdown
Author

Review of a4c2fdd (WI-4161, fork-ci split): no blockers.

Checked in a fresh clone; actionlint and shellcheck are clean on fork-ci.yml and both new scripts.

  1. Aggregator, OK. result (named fmt, clippy, test) has if: always(), needs: [plan, lint, test, test-app-server] (every job), and fails unless every result is success or skipped and plan is success. cancelled, failure and timed-out results all fail. No other job in .github/ uses that name. The parts are named plan, fmt, clippy, test and test (app-server integration). A part is skipped only when plan.outputs.rust != 'true', which is the old path-scope behaviour.
  2. No test dropped. rest runs every selected -p (including codex-app-server) with not (package(codex-app-server) & kind(test)). app-server runs -p codex-app-server with the same expression un-negated. So the halves are exact complements over the same set, and the same known-failures conjunction is applied to each. Tests in the same binary aren't affected, because the cut is by package and kind. Doctests weren't run before (nextest) and still aren't. A workspace member added later lands in rest automatically.
  3. Gates not weaker. cargo check is skipped only when plan.outputs.all == 'true' (selection = every member except voice-host). In that case clippy --all-targets compiles the same targets. Any non-clippy rustc error fails the step, and a nonzero exit with no error diagnostic (build script or linker) fails it too. The clippy hunk gate and fmt --check on the selected crates are unchanged. -D warnings wasn't used before either.
  4. fork-ci-build-jobs.sh, OK. It handles cgroup v2 (memory.max, including max) and v1 (limit_in_bytes, with a huge value clamped to MemTotal). The result is floored at 1 and capped at the core count. There's no external input, so no injection.
  5. Unchanged: permissions (contents: read), action SHA pins, runs-on expression (fork PRs still on ubuntu-24.04), concurrency group and checkout settings. The new aggregator runs on GitHub-hosted ubuntu-24.04, and it only reads needs. The triggers are pull_request, merge_group and workflow_dispatch, the same as before. Note: the old file had no push trigger either. merge_group still runs the full set of jobs.

Non-blocking

  • a. The rest half now maps nextest exit 4 (no tests matched) to success; before, it was || status=1. Masking it only in the app-server half, or passing --no-tests=pass there, would keep rest fail-closed if a filter typo empties it.
  • b. The aggregator accepts skipped for the parts unconditionally. Hardening: when plan.outputs.rust == 'true', require exactly success from lint, test and test-app-server. That way a future edit to a part's if: can't fail open.
  • c. The aggregator's needs list is hand-maintained. A future part job has to be added there, or it isn't gated. Worth a comment next to needs.
  • d. On a cgroup-v2 host where the job isn't at the namespace root, /sys/fs/cgroup/memory.max reads max and the script falls back to MemTotal. That's fine on the node-f runner containers (cgroupns private).
  • e. Both test jobs build the workspace bins, so that work is duplicated. It costs runner time, not correctness. There are only 2 node-f runners, so one heavy job queues.

PR run 43311746966: still queued at review time (plan waiting for a node-f runner), so I have no per-job timings yet. They need to be read once it finishes.

thedancingdeveloper and others added 5 commits November 12, 2026 22:12
…(WI-4161)

The split workflow's test job failed in PR run 43311746966 with
`could not compile codex-core (lib test)` and kache's `exit status: 1`,
no diagnostic. That is the OOM killer, the same signature as run
43136846045: the job landed on nodef-gha-public-docker (10 GiB cgroup;
rust-heavy,node-f also matches the 24 GiB nodef-gha-public-rust), and
the 3 GiB-per-rustc budget gave 3 jobs. The old workflow's fixed
--jobs 2 passed on that runner (run 43178641644).

Budget 4 GiB per rustc after a 2 GiB reserve for cargo, kache and the
linker: 2 jobs on the 10 GiB runner, 5 on the 24 GiB one. The nextest
script now reports cgroup OOM kills, so the next one is named in the log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d integration tests one at a time below 16 GiB (WI-4161)

Run 43317835444's `test` job landed on nodef-gha-public-docker (10 GiB) and
codex-core's `all` test binary was OOM-killed at two build jobs. The
`bigmem` label is unique to nodef-gha-public-rust among node-f runners, so
the job now asks for self-hosted,rust-heavy,bigmem,node-f. The app-server
half keeps rust-heavy,node-f so both halves can still run in parallel.

As a code-side guard, fork-ci-nextest.sh prebuilds the test targets in two
widths: libs, bins and dependencies at the normal width, then the
integration test binaries at fork-ci-build-jobs.sh's new `integration`
width, which is 1 below 16 GiB. Every target nextest builds is still built;
no test is skipped. The width decision and its reason are printed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ase (WI-4161)

fork-ci selected packages from the diff against fork/main. For an upstream
sync that is every package (PR #37: 4,673 files), and a workspace-wide run
over hundreds of upstream crates took 95-105 minutes, past the merge queue's
90-minute check_response_timeout, so the queue dropped the entry twice.

The fork trusts upstream's CI for upstream's code and tests its own delta:
the carried patches and the fork-only files on the upstream commit the tree
merged or rebased onto. `plan` now runs fork-ci-select.sh, which fetches
openai/codex main (the fork's `main` mirror lags), diffs HEAD against the
merge-base, and selects the packages owning those files. The same base
feeds clippy's hunk gate, in PRs and in the queue alike.

Ignored on purpose: the fork's version restamp (the workspace manifest counts
only beyond its version line; the lock is compared by resolve with both sides
at 0.0.0, after a cargo fetch so the --offline reads have every manifest),
and a member Cargo.toml now selects only its own package (codex-home's added
dependencies pulled in the whole workspace through the reverse closure). The
whole-workspace cargo check is gone: clippy --all-targets on the selection
fails on any rustc error.

On the PR #37 tree the selection is 16 packages: app-server-protocol,
app-server, cli, api, home, mcp, config, core, exec, skills-extension, hooks,
model-provider-info, protocol, rmcp-client, thread-manager-sample, tui.

Checks: actionlint, shellcheck, test_fork_changed_packages.py (7 tests),
fork-ci-select.sh run on the PR #37 tree with the version reset.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… quota (WI-4161)

- fork-ci.yml: `test` and `test-app-server` run on [self-hosted, bigmem]
  (rust-heavy and node-f dropped). Two 24 GiB runners carry bigmem
  (ci-bigmem-0, 8 CPU; nodef-gha-public-rust), one per half, and the
  10 GiB nodef-gha-public-docker can no longer take either. The fork-PR
  branch (ubuntu-24.04) is unchanged; plan and lint stay on
  rust-heavy,node-f. Comments no longer say only one runner has bigmem or
  that a unique label is needed.
- fork-ci-build-jobs.sh: cores = min(nproc, ceil(cgroup CPU quota)) from
  cpu.max (v2) or cpu.cfs_quota_us/cfs_period_us (v1); the log line
  prints nproc and the quota. Memory arithmetic unchanged:
  24 GiB / 8 CPU -> 5, 24 GiB / 14 cores -> 5, 10 GiB -> 2 (integration 1).
- fork-ci-build-jobs-test.sh: offline test against fake cgroup files
  (10 cases, pass).

Checks: actionlint fork-ci.yml; shellcheck and bash -n on both scripts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Operator decision 2026-11-13: ci-bigmem-0 is out of the picture for now.
The main test half runs on [self-hosted, bigmem, node-f] (only
nodef-gha-public-rust, 24 GiB); the app-server integration half on
[self-hosted, rust-heavy, node-f] (nodef-gha-public-rust or the slower
10 GiB nodef-gha-public-docker). fork-ci-build-jobs.sh already sizes
width from memory.max and cpu.max; comments no longer name ci-bigmem-0
and a test case covers a 10 GiB runner with a CPU quota.

Checks: fork-ci-build-jobs-test.sh (11 ok), bash -n, shellcheck,
actionlint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thedancingdeveloper
thedancingdeveloper added this pull request to the merge queue Nov 13, 2026
Merged via the queue into fork/main with commit 21a6d57 Nov 13, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.